#include "shmem.h"

static struct shm_param para;

struct shm_data
{
    char data[68];
};

int read_shm(){
    int ret=1;

    ret =shm_init(&para,"TCP_MYQTT",1024);
    if(ret<0)
    {
        return -1;
    }

    struct shm_data *addr=(struct shm_data*)shm_getaddr(&para);
    if(addr==NULL)
    {
        return -1;
    }

    printf("读出来的数据为:%s\n",addr->data);

    return 0;
}